package com.naiterui.ehp.bs.b2c.pharmacy.repository;

import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.naiterui.common.repository.core.BaseJpaRepository;
import com.naiterui.ehp.bs.b2c.pharmacy.entity.Warehouse;

@Repository
public interface IWarehouseRepository extends BaseJpaRepository<Warehouse, Long> {

    boolean existsByName(String name);

    boolean existsByIdNotAndName(Long id, String name);

    List<Warehouse> findAllByStatus(Integer status);

    List<Warehouse> findByStatusAndChangedAtBetween(Integer status, Date startDate, Date endDate);
}
